import java.util.*;


public class Test1 {

    public static void main(String[] args) {
        Test1 t = new Test1();

        System.out.println(t.setstring("BAabB"));
    }
    public String setstring (String str) {
        // write code here

        int[] count = new int[str.length()];

        for (int i = 0; i < str.length(); i++) {
            char ch1 = str.charAt(i);
            count[i] = ch1;
        }

        String string = "";

        for (int i = 0; i < str.length(); i++) {
            for (int j = i + 1; j < str.length(); j++) {
                if (count[i] == count[j]) {
                    count[j] = 0;
                }
            }
        }

        for (int i = 0; i < str.length(); i++) {
            if (count[i] != 0) {
                string += (char)count[i];
            }
        }

        return string;
    }
}